package com.moter.one.wyydemo1.controller;

import com.moter.one.wyydemo1.entity.SongInfo;
import com.moter.one.wyydemo1.service.SongInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
//根据点赞数选出前10歌曲所有信息
public class Like {
     @Autowired
    SongInfoService songInfoService;
     @RequestMapping("/Like")
    public List<SongInfo> getTop10Like(){
         List<SongInfo> list = songInfoService.selectSongInfoTop10_Like_Mapper();
         //System.out.println(list);
         return list;
     }
}
